<?php
$this->layout = '//layouts/column1';

$this->breadcrumbs=array(
	'Manage Members'=>array('Members/admin'),
	$member->first_name." ".$member->last_name=>array('Members/view','id'=>$member->id),
	'Referral Members'
);


Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$.fn.yiiGridView.update('members-grid', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<h1>Referral Members</h1>


<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'members-grid',
	'enablePagination'=>true,
	'dataProvider'=>$model->search(),
	'columns'=>array(
		array(
			'header' => 'S/N',
			'type' => 'raw',
			'value' => '$row+1',
			'headerHtmlOptions' => array('width' => '30px'),
			'htmlOptions' => array('style' => 'text-align:center;')
		),			 
		'first_name',
		'last_name',
		'email',
		'phone',
		/*
		'post_code',
		'refer_code',
		'nric',
		'referrer_id',
		'is_member',
		'title_code',
		'status',
		'balance',
		'created_date',
		*/
		array(
			'class'=>'CButtonColumn',
		),
	),
)); ?>
